// stores/counter.js
import { defineStore } from 'pinia'
import { getUserInfoService } from '@/apis/userApi'
export const useUserStore = defineStore('user', {
  // other options...
  state: () => {
    return {
      userInfo: {
        avatar: '',
      },
    }
  },
  actions: {
    async getUserInfo() {
      const { data } = await getUserInfoService()
      this.userInfo = data
    }
  }

})